package com.cc.data_explore.gui.tab;

import javafx.beans.property.*;

/**
 * PrimaryDialogView
 *
 * @author aa
 * @version 1.0
 * @since 2025/4/1
 */
public class CreateTableDialogData {

    private final SimpleStringProperty sourceField;
    private final SimpleStringProperty targetField;
    private final ObjectProperty<FiledTypeEnum> filedType;
    private final BooleanProperty selected;


    public CreateTableDialogData(String sourceField, String targetField, FiledTypeEnum filedType, Boolean selected) {
        this.sourceField = new SimpleStringProperty(sourceField);
        this.targetField = new SimpleStringProperty(targetField);
        this.filedType = new SimpleObjectProperty<>(filedType);
        this.selected = new SimpleBooleanProperty(selected);
    }

    public String getSourceField() {
        return sourceField.get();
    }

    public SimpleStringProperty sourceFieldProperty() {
        return sourceField;
    }

    public void setSourceField(String sourceField) {
        this.sourceField.set(sourceField);
    }

    public String getTargetField() {
        return targetField.get();
    }

    public SimpleStringProperty targetFieldProperty() {
        return targetField;
    }

    public void setTargetField(String targetField) {
        this.targetField.set(targetField);
    }

    public FiledTypeEnum getFiledType() {
        return filedType.get();
    }

    public ObjectProperty<FiledTypeEnum> filedTypeProperty() {
        return filedType;
    }

    public boolean isSelected() {
        return selected.get();
    }

    public BooleanProperty selectedProperty() {
        return selected;
    }

}
